const focus = {
  inserted(el, binding) {
    console.log('binding.value...', binding.value)
    const options = binding.value
    if (options) {
      const { selectAll, disabled } = options
      if (!disabled) {
        el.querySelector('input')?.focus()
      }
      if (selectAll) {
        document.execCommand('selectAll', false)
      }
    } else {
      el.querySelector('input')?.focus()
    }
  },
}
export default focus
